package com.hyhy.hycloud.uaa.security.exception;

import com.hyhy.hycloud.uaa.UaaErrorDescribable;
import com.hyhy.hycloud.uaa.UaaErrorType;
import org.springframework.security.core.AuthenticationException;

/**
 * 认证验证码错误或已失效
 *
 * @author Xuegui Yuan
 * @date 2018-09-21
 */
public class BadAuthVerificationCodeException extends AuthenticationException implements UaaErrorDescribable {
    public BadAuthVerificationCodeException() {
        super(UaaErrorType.BAD_VERIFICATION_CODE.getMessage());
    }

    public BadAuthVerificationCodeException(String msg, Throwable t) {
        super(msg, t);
    }

    public BadAuthVerificationCodeException(String msg) {
        super(msg);
    }

    @Override
    public UaaErrorType getErrorType() {
        return UaaErrorType.BAD_VERIFICATION_CODE;
    }
}
